﻿<Page
    x:Class="MusicExplorer.Views.RepositoryPageView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:caliburn="using:Caliburn.Micro">

    <Grid Background="{StaticResource DefaultApplicationBackground}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="GoBack" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="CompleteTitle" Style="{StaticResource SubPageHeaderTextStyle}" Grid.Column="1" />
        </Grid>

        <ScrollViewer Grid.Row="1" HorizontalContentAlignment="Stretch" VerticalScrollBarVisibility="Disabled"
                      HorizontalScrollBarVisibility="Auto">
            <ItemsControl Margin="120, 0, 0, 10">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <ItemsWrapGrid />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Genres" Margin="0,-11,10,10" Style="{StaticResource SubheaderTextBlockStyle}" TextWrapping="NoWrap" />
                        <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,-11,0,10" Style="{StaticResource SubheaderTextBlockStyle}" TextWrapping="NoWrap" />
                    </StackPanel>
                    <GridView x:Name="Genres" SelectionMode="None"
                            IsItemClickEnabled="True" Grid.Row="1"
                            caliburn:Message.Attach="[Event ItemClick] = [NavigateToTracks($eventArgs)]">
                    </GridView>
                </Grid>
            </ItemsControl>
        </ScrollViewer>
    </Grid>
</Page>
